Skip to content

Conversation

@DN6
Copy link
Collaborator

@DN6 DN6 commented Sep 24, 2025

What does this PR do?

Make it so that custom blocks can be saved to local_dir so that they are easy to edit.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

module_file=module_file,
class_name=class_name,
**hub_kwargs,
**kwargs,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this since it's not used anywhere downstream.

@DN6 DN6 requested a review from yiyixuxu September 24, 2025 09:07
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@DN6
Copy link
Collaborator Author

DN6 commented Oct 30, 2025

cc: @yiyixuxu gentle ping

@yiyixuxu
Copy link
Collaborator

ohh but i thought you have a pretrained_model_name_or_path that's local, it would work already?

florence-2-custom-block is a local directory i have here

>>> from diffusers import ModularPipelineBlocks
Modular Diffusers is currently an experimental feature under active development. The API is subject to breaking changes in future releases.
>>> blocks = ModularPipelineBlocks.from_pretrained("florence-2-custom-block", trust_remote_code=True)
`trust_remote_code` is enabled. Downloading code from florence-2-custom-block. Please ensure you trust the contents of this repository
>>> blocks
Florence2ImageAnnotatorBlock {
  "_class_name": "Florence2ImageAnnotatorBlock",
  "_diffusers_version": "0.36.0.dev0"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants